package com.cqw.commontest.designmode.decorate;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-09-07 00:21
 * @Description: 装饰类
 */
public class Decorate implements SourceAble {


    private SourceAble sourceAble;


    public Decorate(SourceAble sourceAble) {
        this.sourceAble = sourceAble;
    }


    @Override
    public void method() {
        System.out.println("装饰之前");
        sourceAble.method();
        System.out.println("装饰之后");
    }
}
